package com.tekj.cxqcb.view.Module.activity;

import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.tekj.cxqcb.R;
import com.tekj.cxqcb.view.Module.adapter.RelatedChannelsAdapter;
import com.tekj.cxqcb.view.Module.adapter.UpdataAdapter;
import com.tekj.cxqcb.view.Module.decoration.SpacesItemDecoration;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import common.base.activity.BaseActivity;

/**
 * 升级记录
 */
public class UpdataListActivity extends BaseActivity {
    @BindView(R.id.img_back)
    ImageView imgBack;
    @BindView(R.id.tv_l)
    TextView tvL;
    @BindView(R.id.ll_back)
    LinearLayout llBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_r)
    ImageView ivR;
    @BindView(R.id.tv_r)
    TextView tvR;
    @BindView(R.id.ll_right)
    LinearLayout llRight;
    @BindView(R.id.rl_title_bg)
    RelativeLayout rlTitleBg;
    @BindView(R.id.rv_main)
    RecyclerView rvMain;
    @BindView(R.id.srl_main)
    SwipeRefreshLayout srlMain;

    UpdataAdapter mAdapter;

    @Override
    public void init() {
        tvTitle.setText("升级记录");
        List<String> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add("");
        }
        mAdapter = new UpdataAdapter(list);
        rvMain.setLayoutManager(new LinearLayoutManager(activity));
        rvMain.setAdapter(mAdapter);
        rvMain.addItemDecoration(new SpacesItemDecoration(2));
        mAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
            @Override
            public void onLoadMoreRequested() {

            }
        }, rvMain);

        srlMain.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {

            }
        });

    }

    @Override
    public int setLayout() {
        return R.layout.activity_list;
    }

    @Override
    public void initLoadStart() {

    }

    @Override
    public void initLoadEnd() {

    }

    @Override
    public void initBindingView(Object mBean) {

    }


    @OnClick(R.id.ll_back)
    public void onViewClicked() {
        finish();
    }
}
